//
//  YHReachabilityManager.h
//  YHNetwork
//
//  Created by 000 on 2021/12/25.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworkReachabilityManager.h>

NS_ASSUME_NONNULL_BEGIN

@class AFNetworkReachabilityManager;

typedef NS_ENUM(NSInteger, YHNetworkStatus) {
    YHNetworkStatusUnknown          = AFNetworkReachabilityStatusUnknown,
    YHNetworkStatusNotReachable     = AFNetworkReachabilityStatusNotReachable,
    YHNetworkStatusReachableViaWWAN = AFNetworkReachabilityStatusReachableViaWWAN,
    YHNetworkStatusReachableViaWiFi = AFNetworkReachabilityStatusReachableViaWiFi,
};

@interface YHReachabilityManager : NSObject
/// 网络变化
+ (void)networkChangeBlock:(void(^)(YHNetworkStatus status, NSString * description))block;

+ (YHNetworkStatus)networkReachabilityStatus;
+ (BOOL)reachable;
+ (BOOL)reachableViaWWAN;
+ (BOOL)reachableViaWiFi;

@end

NS_ASSUME_NONNULL_END
